<%-- 
    Document   : HorarioDisciplina
    Created on : 29/10/2011, 13:04:54
    Author     : leonardo
--%>

<%@page import="br.com.ufpb.halloc.negocio.Horario"%>
<%@page import="br.com.ufpb.halloc.negocio.Professor"%>
<%@page import="javax.swing.JOptionPane"%>
<%@page import="java.util.Collections"%>
<%@page import="br.com.ufpb.halloc.comunicacao.Facade"%>
<%@page import="br.com.ufpb.halloc.negocio.Disciplina"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Horario de Disciplinas</title>        
        <style type="text/css">
            
            div#back {
                background-color: lightsteelblue;
                height: 370px;
                margin-top: 20px;
                margin-left: 170px;
                margin-right: 170px;
            }
            
            div#form {
                background-color: #DDD;
                font: 14px Verdana, sans-serif;
                height: 65px;
                border: 1px solid #696969;
                margin-left: 150px;
                margin-right: 150px;
            }
            
            #tab_horario {
                font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
                width:600px;
                margin-left: 150px;
                border-collapse:collapse;                
            }
            
            #tab_horario td, #tab_horario th {
                font: 14px Verdana, sans-serif;
                border:1px solid #333;
                padding:3px 7px 3px 7px;
                color: #000000;
            }
            
            #tab_horario th {
                font: 16px Verdana, sans-serif;
                text-align:center;
                padding-top:5px;
                padding-bottom:4px;
                background-color:#369;
                color:#fff;
            }
                        
            #tab_horario tr.alt td {
                color:#000000;
                background-color: #EAF2D3;
            }
            
            #stylecombo {
                width:400px;
                height: 30px;
                background:#e0e7ec;
                margin-left: 100px;
                margin-right: 0px;
            }
           
            select {
                font: 14px Verdana, sans-serif;
                color: #369;
                font-weight: bolder;
            }
            
            #stylecombo select {
                width:400px;
                height: 30px;
                opacity:1;
                filter:alpha(opacity=0);
            }
            
            #bt_ok {
                margin-left: 525px;
                margin-top: -28px;
                margin-right: 0px;
            }
            
        </style>
        <script language="JavaScript" type="text/javascript">
            function getValor(){
                var codselected = combo.disciplinas.value;
                alert('Cod: ' + codselected);
                var table = document.getElementById("tab_horario");
                
            }
        </script>
        <script type="text/javascript">
            alert(message)
        </script>
    </head>
    <body>
        <jsp:include page="menubarra.jsp"></jsp:include>
        <div id="back">
            <br>
            <div align="center">Horario de disciplina</div>
            <div id="form">
                <br>
                <div id="stylecombo">
                    <form name="combo">
                    <select name="disciplinas">
<%
Facade fachada = Facade.getInstance();                                               
List<Disciplina> disciplinas = (List<Disciplina>) fachada.getDisciplinasCadastradasNoBD();
for(Disciplina d: disciplinas){
%>
    
<option value="<%=d.getID()%>"><%=d.getNome()%></option>
                        
<% }// fim do for-each de disciplinas %>
                                               
                    </select>
                  </form>
                </div>
                <div id="bt_ok">
                    <input type="submit" value="OK" onclick="getValor()">
                </div>
            </div>
            <br>
            <div id="horario">
                <table id="tab_horario">
                    <tr>
                        <td width="25">hora/dia</td>
                        <th width="100">seg</th>
                        <th width="100">ter</th>
                        <th width="100">qua</th>
                        <th width="100">qui</th>
                        <th width="100">sex</th>
                    </tr>
                    <tr>
                        <th width="25">08h</th>                    
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <th width="25">10h</th>                    
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <th width="25">13h</th>                    
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <th width="25">15h</th>                    
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <th width="25">19h</th>                    
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <th width="25">21h</th>                    
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                </table>
            </div>
        </div>        
    </body>
</html>
